package com.bearbig.spring.cloud.example.services;

import com.bearbig.spring.cloud.example.services.impl.UserServiceImpl;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <p></p>
 *
 * @author xiongyu
 * @version $Id: com.bearbig.spring.cloud.example.services 2017/1/29 07:00 xiongyu $
 */
// 指定调用失败后回调接口的实现类
@FeignClient(value = "user-service", fallback = UserServiceImpl.class)
public interface UserService {

    @RequestMapping(value = "/findUserById", method = RequestMethod.GET)
    String getUserNameById(@RequestParam(value = "id") String id);
}
